package com.ruoyi.ring.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ring.mapper.RingEventInfoMapper;
import com.ruoyi.ring.domain.RingEventInfo;
import com.ruoyi.ring.service.IRingEventInfoService;

/**
 * 活动信息Service业务层处理
 * 
 * @author liuwp
 * @date 2025-08-28
 */
@Service
public class RingEventInfoServiceImpl implements IRingEventInfoService 
{
    @Autowired
    private RingEventInfoMapper ringEventInfoMapper;

    /**
     * 查询活动信息
     * 
     * @param id 活动信息主键
     * @return 活动信息
     */
    @Override
    public RingEventInfo selectRingEventInfoById(Long id)
    {
        return ringEventInfoMapper.selectRingEventInfoById(id);
    }

    /**
     * 查询活动信息列表
     * 
     * @param ringEventInfo 活动信息
     * @return 活动信息
     */
    @Override
    public List<RingEventInfo> selectRingEventInfoList(RingEventInfo ringEventInfo)
    {
        return ringEventInfoMapper.selectRingEventInfoList(ringEventInfo);
    }

    /**
     * 根据业务主键查询一条记录：活动信息
     *
     * @param ringEventInfo 活动信息
     * @return 活动信息
     */
    @Override
    public RingEventInfo selectOneRingEventInfo(RingEventInfo ringEventInfo)
    {
        return ringEventInfoMapper.selectOneRingEventInfo(ringEventInfo);
    }

    /**
     * 新增活动信息
     * 
     * @param ringEventInfo 活动信息
     * @return 结果
     */
    @Override
    public int insertRingEventInfo(RingEventInfo ringEventInfo)
    {
        ringEventInfo.setCreateTime(DateUtils.getNowDate());
        return ringEventInfoMapper.insertRingEventInfo(ringEventInfo);
    }

    /**
     * 修改活动信息
     * 
     * @param ringEventInfo 活动信息
     * @return 结果
     */
    @Override
    public int updateRingEventInfo(RingEventInfo ringEventInfo)
    {
        ringEventInfo.setUpdateTime(DateUtils.getNowDate());
        return ringEventInfoMapper.updateRingEventInfo(ringEventInfo);
    }

    @Override
    public int updateRingEventInfoCondition(RingEventInfo ringEventInfo, RingEventInfo ringEventInfoCondition)
    {
                ringEventInfo.setUpdateTime(DateUtils.getNowDate());
        return ringEventInfoMapper.updateRingEventInfoCondition(ringEventInfo, ringEventInfoCondition);
    }

    /**
     * 批量删除活动信息
     * 
     * @param ids 需要删除的活动信息主键
     * @return 结果
     */
    @Override
    public int deleteRingEventInfoByIds(Long[] ids)
    {
        return ringEventInfoMapper.deleteRingEventInfoByIds(ids);
    }

    /**
     * 删除活动信息信息
     * 
     * @param id 活动信息主键
     * @return 结果
     */
    @Override
    public int deleteRingEventInfoById(Long id)
    {
        return ringEventInfoMapper.deleteRingEventInfoById(id);
    }

    /**
     * 条件删除活动信息
     *
     * @param ringEventInfo 活动信息
     * @return 结果
     */
    @Override
    public int deleteRingEventInfoByCondition(RingEventInfo ringEventInfo)
    {
        return ringEventInfoMapper.deleteRingEventInfoByCondition(ringEventInfo);
    }

}
